#include <iostream>
using namespace std;
class person1{
    public:
    int a;
    int b;
    person1(){
        cout<<"person()"<<endl;
    }
    person1(int x):a(x){
        cout<<"prrson(int x)"<<endl;
    }
    person1(int x,int y):a(x),b(y){
        cout<<"person(int x,int y)"<<endl;
    }
    //委托构造函数
    person1(string name,int x,int y):person1(x,y){
        cout<<"name="<<name<<endl;
        cout<<"person(string name,int x,int y)"<<endl;
    }
};
class person2:public person1{
    public:
    string name;
    //使用基类的构造函数
    using person1::person1;
    //委托构造函数
    person2(string m_name,int x,int y):person1(x,y),name(m_name){
        cout<<"name="<<this->name<<endl;
    }
};
int main()
{
    person2 s("张三",4,3);
    return 0;
}